import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/buyBooks',
    name: 'buyBooks',
    component: () => import('../views/pages/buyBooks.vue')
  },
  {
    path: '/sellBooks',
    name: 'sellBooks',
    component: () => import('../views/pages/sellBooks.vue')
  },
  {
    path: '/bookRental',
    name: 'bookRental',
    component: () => import('../views/lease/bookRental.vue')
  },
  {
    path: '/rentBooks',
    name: 'rentBooks',
    component: () => import('../views/lease/rentBooks.vue')
  },
  {
    path: '/myInformation',
    name: 'myInformation',
    component: () => import('../views/mine/myInformation.vue')
  },
  {
    path: '/myShop',
    name: 'myShop',
    component: () => import('../views/mine/myShop.vue')
  },
  {
    path: '/myStash',
    name: 'myStash',
    component: () => import('../views/mine/myStash.vue')
  },
  {
    path: '/purchaseHistory',
    name: 'purchaseHistory',
    component: () => import('../views/mine/purchaseHistory.vue')
  },
  {
    path: '/saleHistory',
    name: 'saleHistory',
    component: () => import('../views/mine/saleHistory.vue')
  },
  {
    path: '/mySetting',
    name: 'mySetting',
    component: () => import('../views/mine/mySetting.vue')
  },
  {
    path: '/commMessage',
    name: 'commMessage',
    component: () => import('../views/community/commMessage.vue')
  },
  {
    path: '/bookAI',
    name: 'bookAI',
    component: () => import('../views/community/bookAI.vue')
  },
  {
    path: '/indexLogin',
    name: 'indexLogin',
    component: () => import('../views/signLogin/indexLogin')
  },
  {
    path: '/indexSign',
    name: 'indexSign',
    component: () => import('../views/signLogin/indexSign')
  },
  {
    path: '/',
    redirect: '/indexLogin'
  }
]

const router = new VueRouter({
  routes
})

export default router
